package sudroid.oauth;

import java.io.Serializable;
import javax.crypto.spec.SecretKeySpec;
import sudroid.net2.HttpException;
import sudroid.net2.Response;

abstract class OAuthToken
  implements Serializable
{
  private static final long serialVersionUID = 2385887178385032767L;
  String[] responseStr = null;
  private transient SecretKeySpec secretKeySpec;
  private String token;
  private String tokenSecret;

  OAuthToken(String paramString)
  {
    String[] arrayOfString = paramString.split("&");
    this.responseStr = arrayOfString;
    String str1 = getParameter("oauth_token_secret");
    this.tokenSecret = str1;
    String str2 = getParameter("oauth_token");
    this.token = str2;
  }

  public OAuthToken(String paramString1, String paramString2)
  {
    this.token = paramString1;
    this.tokenSecret = paramString2;
  }

  OAuthToken(Response paramResponse)
    throws HttpException
  {
    this(str);
  }

  public boolean equals(Object paramObject)
  {
    int i;
    if (this == paramObject)
      i = 1;
    while (true)
    {
      return i;
      if (!(paramObject instanceof OAuthToken))
      {
        i = 0;
        continue;
      }
      OAuthToken localOAuthToken = (OAuthToken)paramObject;
      if (this.secretKeySpec != null)
      {
        SecretKeySpec localSecretKeySpec1 = this.secretKeySpec;
        SecretKeySpec localSecretKeySpec2 = localOAuthToken.secretKeySpec;
        if (localSecretKeySpec1.equals(localSecretKeySpec2));
      }
      else
      {
        do
        {
          i = 0;
          break;
        }
        while (localOAuthToken.secretKeySpec != null);
      }
      String str1 = this.token;
      String str2 = localOAuthToken.token;
      if (!str1.equals(str2))
      {
        i = 0;
        continue;
      }
      String str3 = this.tokenSecret;
      String str4 = localOAuthToken.tokenSecret;
      if (!str3.equals(str4))
      {
        i = 0;
        continue;
      }
      i = 1;
    }
  }

  public String getParameter(String paramString)
  {
    String str1 = null;
    String[] arrayOfString = this.responseStr;
    int i = arrayOfString.length;
    int j = 0;
    while (true)
    {
      if (j >= i);
      while (true)
      {
        return str1;
        String str2 = arrayOfString[j];
        String str3 = String.valueOf(paramString);
        String str4 = str3 + 61;
        if (!str2.startsWith(str4))
          break;
        str1 = str2.split("=")[1].trim();
      }
      j += 1;
    }
  }

  SecretKeySpec getSecretKeySpec()
  {
    return this.secretKeySpec;
  }

  public String getToken()
  {
    return this.token;
  }

  public String getTokenSecret()
  {
    return this.tokenSecret;
  }

  public int hashCode()
  {
    int i = this.token.hashCode() * 31;
    int j = this.tokenSecret.hashCode();
    int k = (i + j) * 31;
    if (this.secretKeySpec != null);
    for (int m = this.secretKeySpec.hashCode(); ; m = 0)
      return k + m;
  }

  void setSecretKeySpec(SecretKeySpec paramSecretKeySpec)
  {
    this.secretKeySpec = paramSecretKeySpec;
  }

  public String toString()
  {
    StringBuilder localStringBuilder1 = new StringBuilder("OAuthToken{token='");
    String str1 = this.token;
    StringBuilder localStringBuilder2 = localStringBuilder1.append(str1).append(39).append(", tokenSecret='");
    String str2 = this.tokenSecret;
    StringBuilder localStringBuilder3 = localStringBuilder2.append(str2).append(39).append(", secretKeySpec=");
    SecretKeySpec localSecretKeySpec = this.secretKeySpec;
    return localSecretKeySpec + 125;
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     sudroid.oauth.OAuthToken
 * JD-Core Version:    0.6.0
 */